﻿CREATE TRIGGER UsersRoles_Tracking_Delete
ON [dbo].[UsersRoles] 
AFTER delete
AS 
BEGIN
	UPDATE Sync.UsersRoles_Tracking 
	SET LastUpdatedDate  = getdate(),
		IsDeleted = 1
	FROM Sync.UsersRoles_Tracking s JOIN DELETED i
    ON s.RoleID = i.RoleID AND s.UserID = i.UserID
END














